package optimizers.ganeat.triangle;

import java.util.Map;

import fitness.Fitness;
import fitness.TriangleFitness;

import optimizers.commons.RunConfig;
import optimizers.ganeat.Connection;
import optimizers.ganeat.Constants;
import optimizers.ganeat.GA;
import optimizers.ganeat.Individual;
import optimizers.ganeat.Node;
import optimizers.ganeat.bistableswitch.IndividualBistableSwitch;

public class GATriangle extends GA {
	public GATriangle(RunConfig config) {
		super(config);
		// TODO Auto-generated constructor stub
	}

	@Override
	public Individual getInitialIndividual() {
		IndividualTriangle indiv = new IndividualTriangle(innovations,
				nodeNames, -1, 0, config);
		indiv.nodeGenes.add(new Node("a", 50, config.seqC.defaultValue,
				Node.SIMPLE_SEQUENCE));
		// indiv.nodeGenes.add(new Node("b", 25, Node.SIMPLE_SEQUENCE));
		// indiv.nodeGenes.add(new Node("Iaa", Constants.defaultNodeParam,
		// Node.INHIBITING_SEQUENCE));
		indiv.addConnection(indiv.getNode("a"), indiv.getNode("a"), true, 5);
		// indiv.addConnection(indiv.getNode("a"), indiv.getNode("b"), true, 1);
		// indiv.addConnection(indiv.getNode("b"), indiv.getNode("Iaa"), true,
		// 50);
		return indiv;
	}

	@Override
	public Individual getNewIndividual(Map<String, Integer> innovations2,
			Map<String, String> nodeNames2, int i, int j) {
		return new IndividualTriangle(innovations2, nodeNames2, i, j, config);
	}

	@Override
	public String getProblemName() {
		return "Triangle";
	}

}
